<%@ page contentType="text/html;charset=UTF-8" import="java.util.Enumeration" language="java"%>
<!DOCTYPE html>
<html>
<head>
<title>接收并处理表单数据</title>
</head>
<body>
  <%
      request.setCharacterEncoding("UTF-8");
      response.setContentType("text/html;charset=UTF-8");
      Enumeration<String> names = request.getParameterNames();
      while (names.hasMoreElements()) {
          String name = names.nextElement();
          String[] value = request.getParameterValues(name);
          if (value.length > 1) {
              out.print("遍历数组" + name + "<br>");
              for (String param : value) {
                  out.print(param + "<br>");
              }
          } else {
              out.print(value[0] + "<br>");
          }
      }
  %>
</body>
</html>
